////////////////////////////////////////////////////////////////////////////////////////////////////
/// Copyright (c) 2009 - 2010 RacoonStudios
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this
/// software and associated documentation files (the "Software"), to deal in the Software
/// without restriction, including without limitation the rights to use, copy, modify, merge,
/// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
/// to whom the Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in all copies or
/// substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
/// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
/// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
/// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
/// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS IN THE SOFTWARE.
////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once
#ifndef textwriter_h__
#define textwriter_h__

#include "iosystem/streamwriter.h"

namespace IO
{
	////////////////////////////////////////////////////////////////////////////////////////////////////
	/// \class	TextWriter
	///
	/// \brief	As you might expect this is indeed a simple TextWriter.
	///
	/// \author	Markus
	/// \date	13.02.2010
	////////////////////////////////////////////////////////////////////////////////////////////////////
	class TextWriter : public StreamWriter
	{
		RE_DeclareClass(IO::TextWriter);

	public:

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	TextWriter()
		///
		/// \brief	Default constructor. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		////////////////////////////////////////////////////////////////////////////////////////////////////
		TextWriter();

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	virtual ~TextWriter()
		///
		/// \brief	Finaliser. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		////////////////////////////////////////////////////////////////////////////////////////////////////
		virtual ~TextWriter();




		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void WriteChar(uchar c)
		///
		/// \brief	Writes a char. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \param	c	The char we want to write onto the Stream. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void WriteChar(uchar c);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void WriteString(const Helper::String & str)
		///
		/// \brief	Writes a string. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \param	[in]	str	The String we want to write onto the Stream.. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void WriteString(const Helper::String & str);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void WriteFormat(const char * fmt, ...)
		///
		/// \brief	Writes a format. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \param	[in]	fmt	The text we want to write onto the Stream. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void WriteFormat(const char * fmt, ...);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void WriteLine(const Helper::String & line)
		///
		/// \brief	Writes a line. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \param	[in]	line	The line we want to write onto the Stream. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void WriteLine(const Helper::String & line);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void WriteParagraph(const Helper::Array<Helper::String> & lines)
		///
		/// \brief	Writes a paragraph. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \param	[in]	lines	The lines we want to write onto the Stream. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void WriteParagraph(const Helper::Array<Helper::String> & lines);

	protected:

	private:

	};

}

#endif // textwriter_h__